Use extglobbing instead of sed to simplify cwd