Add file hashing support

This adds a new option, `hashType`, which allows files to be hashed in the format `filename.$HASH.ext` (rather than `/$HASH/filename.ext`, which is the default).