strip extension in all path components