Fixed a problem where saving a map would hang when the nodesbuilder produced too much output on stdout and strerr. Fixes #417. Fixes #498