Resetting previously selected folder when selecting a file with Finder
Alas, my question was not so popular that it inspired people to answer my question. But after rephrasing my google search terms and some investigation of my own. I found a solution to this.

It appears every application stores these previously opened folders as defaults, which is also the command you need in Terminal to see and reset this value.

I stumbled upon this Quora answer which introduced me to the defaults command. It seems all you need is the bundle identifier of your application (in the source example org.videolan.vlc) and the namespace of the default you are trying to erase.

I found the bundle identifier of my application by typing lsof | grep [appname] 
 (which isn't very reliable, because the application name could differ slightly from the bundle identifier) and looking for Library (which commonly hold folder names with these bundle identifiers) in the result. But you can also do defaults read &gt; defaults.log and search the file for your the path of the folder you are trying to erase the default for.

This led me to the namespace NSNavLastRootDirectory. So all I have to do is execute the command defaults delete com.bundle.identifier NSNavLastRootDirectory everytime right before I open the application. 

How I am going to do that? I'm not sure yet. Probably some Applescript solution.
Furthermore I was wondering if I used the right tags for this, since my question got so little attention.