small fixes in variable/path parsing.
fix for linux/osx mkdir/access #include file.