Refactor action_create in remote_directory provider