Use child_process.exec and fixes some warnings

Also fixes #1, fixes #3 in a better way.