Resubmitted fix for issue 81.

LEGAL_CHARACTERS expression changed to handle _all_ file/database name requirements. Enforce legal characters [1] and first character is lowercase alpha.

Only lowercase letters (a-z), digits (0-9), and any of the characters _, $, (, ), +, -, and / are allowed. Moreover, the database name must begin with a letter. from cloudant.com