Updated getTemplate to allow subdirectories.