Basecurve tool fixes

Hello,

I tried the new basecurve tool, but had a few problems with portability (gnu/linuxisms?): I'd like to propose a CMakeLists.txt file to replace the Makefile, usage of the -o/-a flags instead of &&/|| in test conditionals in the helper script, and calling the tool with ./ preprended to the binary path (or maybe the script should update its PATH).