Use Java7 file APIs to get saner exceptions etc.

And since windows does not support moving a file on top of another
existing file, remove the old file before moving.

Patch by marcuse, reviewed by jbellis for CASSANDRA-5383.