Fix (and test) remotesync when applied to a path