Re-add the previous workaround to remember the directory Geany was started from

My previous fix (e1ce9cfbec) didn't fix all possible use cases (opening
files from CLI when starting Geany). This one should close the gap.