Fix skin parsing, related to $(dir) keyword

Broke skin parsing when removing damage skin support in
c3ba7e7e5eea1f1d56435e24ca2085b332efc029.

Hanging else caused shaders without $(dir) to not be added to surface
link list, and all surfaces afterward were added to the disconnected
link list.
Merge remote-tracking branch 'ebx/master'