improving swig-install output and npm error handling