Applied @lohmander's fix for IE8 memory bug.
Fixes issue where incorrect closing bracket could be paired with media query.
Added comments back in.
Fixed issue in my regex where it was being too greedy.
Properly saving result of regex find-replace to variable now.
Removed debugging comment.
Merge pull request #30 from DFurnes/master

Fixes incorrect parsing of media query blocks.