Fixed internal filenames and added correct File::Basename function.