added mkdir and rm commands. refactored mv function to follow DRY