Implement Node v.0.8.x compatibility
Beautify fix for os temporary directory checking
Move workarounds for node 0.8 to lib/legacy