add a basic check for readonly filesystems

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>