Prolly won't help, but since you said it just "all of a sudden" started doing this, I am imagining that it is more on the OS end than MAME.
Did you log into your computer under a different name or account that may not have write priveleges to the directory (or root directory) that you have MAME in? I found this to be a huge problem when dealing in Vista (until SP1). Dunno what OS you are using. Just on a lark, try running MAME using admin priveleges and see if that fixes it. Also might want to check dir/file attributes to see if they got switched to read-only for some odd reason.
If you are using MAME32 or MAMEUI, I have found that it often doesn't save anything if you just close the window with the "x" button, but will if you use the menu to close the program (although you said you made a custom compile, so I bet you are using command prompt MAME).
Another seemingly dumb question, did you use taskman to see if there was another copy of MAME sitting in the background? If that copy has ini/etc files open for writing, the copy you are using wont be able to write to those files.
EDIT: Even if a program has a file open for reading, it exempts (locks) it from being written to until the file is closed from reading. I forgot about the "File open for writing, program has exclusive access; File is open for reading, any program can open for reading, but no program may open for writing" thing.