Python Function Modify Input Director