Allow directories in file rename mappings.

This helps fix the problem in issue #41.