Made command.js functional by piping streams to stdio