Add more escaped() calls in directory.c

Patch from teor to fix 13071.
Clean up the MVSC nmake files so they work again.

Fixes bug 13081; bugfix on 0.2.5.1-alpha. Patch from "NewEraCracker."