Fix logic when checking for transparency or border_style.

A value of 0 is valid for both transparency and border_style. Python evaluates 0 to be False.

Fixes #161
Merge pull request #162 from dlintott/fix_161

Fix logic when checking for transparency or border_style.