Add tests along with a travis-ci config

You will need to enable travis-ci and put the status image in your self.

-- edited out. tests now pass --
I will add more tests as I go along but this seems like a good place to start off with.