Fix file names when using resources with underscores