[loc] fix a crash on exit

* Don't free loc_filename if it points to embedded name
* Also fix resizing of main dialog