Properly validating user input
Merge pull request #123 from jasonerpenbeck/master

Properly validating user input closes #46