page-read: Sanitize opening routines

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>