Updating copy to file path function to fail gracefully when the buffer does not conatin a file name.