fix #19 and add  HEAD entry for error messages in OperationFailed

Fix #19 by using `fromstring` without`StringIO`. Works for me on python3.