Copied over if_file_exists and if_folder_exists from copy_dropbox.