fix indexes of written pdb files

PDB files were being written with every atom having an index of 1 due to an implicit conversion involving Selection. Fix that and add a test.
make develop and master rebase by default too