Call to_s instead of using implicit conversion to a hash key. 

It's easy to pass these a Pathname instead of the expected string and get a cryptic error message: 'no implicit conversion of Pathname into Integer'.