add .gitignore
add input argument check (CVE-2014-3927) (GH #1)

Protect against newlines and likes by explicitly allowing only
legitimate characters.