Fix database-level permission bug by escaping slashes in db names