Rework cmd/filename parser

Fixes #105 and #51
Disable some debug outputs