Extensive refactor

Copied AM layout for module
Moved all useful code from script to module
Refactored hdf5 2 tped. Samples done by integer, not bool. Now should be in same order as tfam file.

(unsure if I need pyc files)