Fixes for nohup, using stdin.isTTY flag for determination