Writing image(s) into user's desired directory on his own PC

I’m moving the recent discussion to a new post. This thread has gotten fairly long and complex and diverged from the original question.