MPD.Internal: a safer close

Ensure that hClose is executed even if hPutStrLn
should fail for some reason (though it is unlikely that
one will fail and the other succeed).