Added better support to template loader for paths that don't use slash
as path sep.