Jaw2966 commented: " I know this is old, but for the people coming here to fix the problem for themselves. You're probably saving in the "Geany" folder and trying to execute your file out of the folder. Try saving your file on your desktop."
This suggestion worked fine for me and appeared to cure the problem.