[PIR-833] Save dialog tries to save at wrong location when a file was selected