Add polygon tests and fix associated bugs

Close rings and account for fill opacity.