lastError() added and config reading and writing fixed

Added lastError(), returns 0 if the last call returned +ok. Also fixed readConfig and writeConfig (readConfig works now, writeConfig is untested as I'm not sure how brick proof these wifi modules are)