initialize type to '' for each loop iteration

Using an old value from a previous loop for type could cause confusion and make the script throw exceptions
RegExp \b matches -, not what we want

This regexp turned out to be too simplistic (I'm surprised I didn't discover this bug earlier..). Because \b also matches - this will in fact detect "-webkit-gradient" and believe there is an existing "gradient" instruction. Oops..
Merge pull request #2 from hallvors/rxfix

initialize type to ' ' and fix RegExp '\b' problem