Add is_writeable() tests.
Fixes #333.