I like to keep the save states, save games and extracting tmp folder outside of roms folder so I use the individual retroarch.cfg inside of each platform config folder to make it happen, it worked well in previews versions but I cannot make it work on retropie 3.1.
The directories were previously created with permissions set to 777.
Here is my retroarch.cfg
# Settings made here will only override settings in the global retroarch.cfg if placed above the #include line
input_remapping_directory = /opt/retropie/configs/gamegear/input_remapping/
savefile_directory = /home/pi/RetroPie/srm/gamegear
savestate_directory = /home/pi/RetroPie/sstate/gamegear
extraction_directory = /home/pi/RetroPie/tmp/gamegear
Overlays/Pillarboxs and other goodies for Retropie: