fix ups

Just some fix ups to make it work. The segfault was happening because `jpg_open` needed to be called BEFORE `detect_f5`. This required adding some more functions into common.

You can see in spotf5.c how I initialize the jpg structs with the call to `jpg_open`.

Also, I added a build script using cmake for easy compilation. See the README for infos.