title: Bash - PWD not executing in current folder
body: <p>I am using the following executable to download a zip from the web, extract it and then delete the zip.</p>
  
  <pre><code>#!/usr/bin/env bash
  
  echo "Downloading project resources from Storage..."
  
  filename="outfile.zip"
  
  if curl --silent -o "${PWD}/${filename}" -L "https://mylink.com"; then
      unzip "${filename}"
      if [[ -f "${PWD}/${filename}" ]]; then
          echo "Removing the file.."
          rm -f "${PWD}/${filename}"
      fi
  else
      echo "Something went wrong"
  fi
  echo "Done!"
  </code></pre>
  
  <p>However, <code>PWD</code> does not seem to work as the zip is downloaded in the home directory of my Mac and the files are extracted there as well. I want to the zip to download and extract in the same folder of the executable file, no matter where it is. </p>
  
  <p>What am I doing wrong here?</p>