fixes #25 add test cases and data for 3 incompletely covered branches
Merge pull request #30 from jantman/issues/25

fixes #25 add test cases and data for 3 incompletely covered branches