Added sync(), make_directory(), and cache_directory() functions.