check_readonlyfs: create two new functions for better code readability

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