Fix for rehash

Here's a solution to preventing filenames getting rehashed improperly.

Problem:
If you run filerev on the same directory twice then you would get something like this
> filename.js -> filename.hash12.js

Then on second pass:
> filename.hash12.js -> filename.hash12.hash12.js

With this fix, you can rerun filerev multiple times in the same directory. 
If you modify a versioned file it will replace the existing hash
> filename.hash12.js -> filename.hash34.js

Sorry for submitted two previous PRs, i'm new to git and couldn't figure out how to clean up my branch.

Thanks