fix error if no cat was defined and use list comprehension to also strip whitespace
Merge pull request #2 from lad1337/master

fix error if no cat was defined and use list comprehension to also strip whitespace