Avoid chmoding unless requested, fixes #348