Added functionality to save .xcfg files.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>