Changed regex in file_to_id sub to allow for dots in filenames.