resizefs: first check if device is writable before attempting

In a container the device nodes may exist but not be writable.
I'm seeing this on trusty host with trusty containers, the root
device ends up looking like it is to /dev/loop0.