fixed resourcePathToFilename, unit tests