Fixed bug in find_filename_or_new, causing the creation of file with empty base name in the working directory.