Revert to separate template/include dirs

Includes (at least most) changes from when they were originally
separated.