Make sure that dest is a directory before prepending it to the output path

When `expand` is set to `true`, `file.dest` is actually a full file path rather than a directory. This patch fixes it so that grunt-hash maintains the directory structure but renames the file with the hash in the filename.