If your host allows you to add Apache configuration files assuming your web server is running some version of *nix then do the following to disable PHP Safe Mode which is causing your error.
To turn safe mode off using .htaccess:
# create a text file i.e. htaccess.txt with the line:
php_flag safe_mode off
# upload this file to the root of your web server if you like or just place it in the magento directory
Now rename the file to .htaccess
Run setup again and it should work. Let me know if that works for you.