When I upgraded to Mavericks I discovered that my external keyboard modifier keys (for multiple wireless keyboards) were no longer mapped as they had been before. I was able to fix this by going in to System Preferences > Keyboards > Modifier Keys However, every time I disconnect and reconnect the keyboard(s) I need to go back in and manually change the settings which always revert to the internal Apple Keyboard settings. Is there any way to save my preferences so that I won't need to do this every time?
It sounds like the settings aren't getting saved properly. Try running Disk Utility and Fix Permissions on your startup volume. I usually run this a couple of times and reboot when I'm done when I start having problems like this.
If that fails check the system logs in Console.app while making these changes to see if System Preferences.app is writing any error messages when changing this setting or quitting.
I remap the caps lock key to control and I've never had this problem when switching keyboards, which is something I do every day.
Try Karabiner; It's great, but kinda heavy, very customizable
Lots and lots of settings and options to play with.
In the General section you can find "Don't modify internal keyboard", so you can modify the external only.