Added a test for writing pdb