Fix empty filename parsing. Closes #1