imthiaz, I believe you should be using the wp_upload_dir() function to determine this. The basedir and baseurl keys from the resulting array should give you the values that you are attempting to calculate.
$uploads = wp_upload_dir();
$this->s3CacheFolder = $uploads['basedir'] . DIRECTORY_SEPARATOR . 's3temp' . DIRECTORY_SEPARATOR;
$this->mediaUrl = $uploads['baseurl'] . '/';
$this->mediaPath = $uploads['basedir'] . DIRECTORY_SEPARATOR;