Set up $base_path differently

Should prevent breakage at Server Beach
Sanitize input
Escape the account name