add media test cases and fix for issue #24

note: nested format output is slightly broken; I changed tests/outputs/media.css to accept the broken output in the interim