Complete PomdpXWriter Class with tests

I had to create a fresh branch with a single commit as the branch which I was working on messed up.
Don't go for ```if sth is not None```. Its better ```if sth```