Split multiple context managers into separate with statements

Having multiple context manager within a single with statement is a
python31 feature that has been backported to python27 but is not
available in python26.
Merge pull request #24 from pymad/fix-python26-test

Fix tests failing on python26 tests.