Added tests for cell span calculation.
Rename xmlwriter test dir.
Tidied code to comply with PEP8.