Better emulation of node.js file functions

Prevents exceptions in some cases, like looking for images in various
possible locations
Uncommented some code that was commented out for the browser version of stylusJS

We need it and can use it since we're not in a browser!
Merge branch 'master' into test-environment