use platform-specific path separators

Windows uses "\" as a path separator. This normalizes things so we can
use "/" in the require() call and not break the absolute path returned
from context. The third replace() call in Unix is a no-op.
fix string replacement for nested template paths
Merge pull request #2 from jdiaz5513/master

use platform-specific path separators