I'm using the Pi 2, getting ready to do another build, been having trouble with saving the configuration file in cgminer-gekko. Think I narrowed it down to libjansson-dev, but not sure yet.
Are you sure that your config file is not damaged? If you're been cutting and copying from web pages, it might have high ASCII or other unreadable characters in it.
I don't know what platform you're on, but you probably can "clean" the text to make sure it doesn't have whacky characters in it. On the Mac there's a tool called TextWrangler (it's free) that has a "Zap Gremlins" command that removes non-ASCII characters. Very useful.