Fixing #3 where calling rename() may fail at times

- Issue was that files at different mount points can't be renamed in
  this manner. Fixed by changing the renaming scheme to not use rename()

- Also stylistic changes