Temp nxtrans.cfg files are not stored where i want them to be. This means the application will "pollute" all the directories where data is accessed. Why is that?
If you don't specify a directory the system default temp path is used to store the temporary storage files.
nxTrans.cfg (which you are seeing in every database directory) are NOT temporary files. They will never have a size other then 16 byte. These files store the highest LSN (log sequence number) and the date/time of the most recently updated table.
When an alias is first opened the server will check for that cfg file, if it exist compare the date/time stored there with the date/time of the newest table. If it matches the server assumes the LSN in the cfg file is the highest in the alias and uses that to initialize the transaction manager for that alias.
Otherwise all tables in the alias will be opened to determine the highest LSN. The nxTrans.cfg file is also used to exclusively "lock" the alias. While a server engine has the alias opened it holds an exclusive lock on that file preventing all other server engines from trying to access the alias.