Windows returns EINVAL on bogus filenames

Related pull of pyramid_jinja2: https://github.com/Pylons/pyramid_jinja2/pull/94