file renaming nearly done
renaming now works. doesn't handle permissions yet though