Correctly handles `attrs['readonly'] = True`

Thanks to https://gist.github.com/czpython/7683425 for posting the fix.

This closes #136.