Fixed behaviour of rename function

closes #22, rename will now behave like php rename rather than bash mv