Fix Path and environment vars for java and node.

Make sure npm path is setup correctly on OS X. Also make sure that
JAVA_HOME on OS X.