Other than making sure you have full read/write permissions to where ever the config files are living, also make sure that you are properly exiting MAME. MAME writes all config options on quit, so if you do a hard power-off to your system without closing MAME first, the session settings are lost.