Fixes grunt's stdin for makeref

Fixes #1157