Do not have debug printout if stderr is closed.

If the profiled program closes stderr stream the igprof_debug got to be disabled
to avoid garbling the output which end up reusing the closed file descriptor.
Merge pull request #23 from mkurkela/fix-close

Do not have debug printout if stderr is closed. Fixes #19.