Namespace templates according to directory they're in