Updating script to support checking in directories that have been replaced (i.e. by WordPress plugin or theme auto-updates