More error checking, create each wallet directory explicitly to avoid race between wallet startup (that would otherwise create the directory) and pid file creation (that needs the directory to be there already).
Add a 'stopall' option, rename the 'closewallet' option and related code to 'stopwallets', refactor the whole thing.
Merge pull request #10 from teknico/add-closedaemon

multiwallet: refactor, add error checking, add a "stopall" option.