fixed compatibility with newer zenphoto versions

Since at least version 1.4.4 zenphoto uses a new cookie name and format. This
change supports this new cookie format. Also make sure everything is escaped
properly.