Close p->mwf.fd only if necessary

This fixes a regression introduced in revision 9d2f841a5d39fc25ce722a3904f6ebc9aa112222.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge pull request #1749 from csware/handle-fixes

Close p->mwf.fd only if necessary
Fix -n bug; default to all ancestors
Fix possible double close

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge pull request #1753 from 13ren/log-bugfix

Fix -n bug; default to all ancestors
Merge pull request #1755 from csware/double-close

Fix possible double close