Made Block::purgeExpired() check for read-only mode.

Change-Id: Ida4f82b8e17a0f7ba872e46fd8a4c87831e5254f