Fix exception on bad directive '@'

Without this fix the following exception was raised:
NoMethodError: undefined method `gsub' for nil:NilClass
Merge pull request #1063 from felixbuenemann/fix-empty-directive-exception

Fix exception on bad directive '@'