Factor out put_file() and get_file() functions so they have a C++ API as well as command-line svn path=/trunk/boinc/; revision=23425