use wp_upload_dir() if php temp directory is not writeable