fix stack-overflow exception when parsing an empty shade file

I stumbled over this when feeding @sakeproject an empty shade file.
I created a unit test for this, and also added a possible fix.
Empty spark files are not a problem (also confirmed with a unit test).