Fix bug when saving page image

Stale code from before the DB PDO conversion

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>