merge upstream
fix png content-type, added unittest hooks for doctests
fixed README