Move geometry parsing to create_cairo_context()

Define create_cairo_context(char *) which returns a context created with
a surface with the specified geometry.
Move variable declarations to top

C99 is much more flexible with where declarations can occur, but let's
stick with with the traditional constraint of putting them at the top of
a function for better compatibility.
Fix typo in comment
Use an existing image for geometry

Take a path to an existing image as an alternative to specifying the
geometry explicitly.