Added tipid<=>int conversion functions

tipid_to_int() and tipid_from_int()
Refined tipid conversion functions
Merge pull request #56 from nmpeterson/master

Added TIPID validation and conversion (to/from int) functions