Added prefix option, compatibility with grunt.hashmap, and made it much more efficient and error-proof