TypeError: Object #<Object> has no method 'tmpdir'

Fixed os.tmpdir for older version of node.

Thanks for the great project.