Fixes pushd complaint about closed stdout