Added rename function

Wanted to move a file, but didn't want to use os.
Merge pull request #5571 from jamesalbert/patch-2

Added rename function