modularizing and testing adapt-node_gyp