Fix build and handling of string inputs starting with a dash

Fixes #176.