print regerror message when broken regex was given
being paranoid: close stdin/stdout in parent process (stderr left open)