Parse mode correctly

Fixes kevva/bin-wrapper#27.