title: Jenkins Pipeline job can't find script due to @tmp path being created
body: <p>I am writing a pipeline job that will call another script to execute. The Jenkinsfile and script exist in the same directory and yet the job fails to find the script to run. </p>
  
  <p>This is the relevant bit of script;</p>
  
  <pre><code>stage ('Update') {
      try {
          dir('jenkins/pipeline/update-jenkins-plugins-ppln') {
              sh 'ls -l'
              sh 'update-plugins.sh'
          }
  }
  </code></pre>
  
  <p>which returns the following error;</p>
  
  <pre><code>[update-jenkins-plugins-ppln] Running shell script
  + ls -l
  total 8
  -rw-r--r-- 1 jenkins jenkins 2441 Dec 20 09:34 Jenkinsfile
  -rwxr-xr-x 1 jenkins jenkins  506 Dec 19 14:06 update-plugins.sh
  [Pipeline] sh
  [update-jenkins-plugins-ppln] Running shell script
  + update-plugins.sh
  /var/lib/jenkins/workspace/update-jenkins-plugins-ppln/jenkins/pipeline/update-jenkins-plugins-ppln@tmp/durable-11cefdd0/script.sh: 2: /var/lib/jenkins/workspace/update-jenkins-plugins-ppln/jenkins/pipeline/update-jenkins-plugins-ppln@tmp/durable-11cefdd0/script.sh: update-plugins.sh: not found
  </code></pre>
  
  <p>As you can see, the pathing I'm using is correct because according to the <code>ls</code> the file I need <code>update-plugins.sh</code> is in the directory I've pathed to. For some reason though, when actually searching for the script Jenkins is adding <code>@tmp/durable-8d48734f/script.sh</code> onto the path. </p>
  
  <p>Various troubleshooting:</p>
  
  <ul>
  <li>I read that you have to checkout the branch again even if you're already checking it out to get the Jenkinsfile, so I am.</li>
  <li>I have ssh'd into the Jenkins box to check and yes, the script is there.</li>
  </ul>
  
  <p>Why is Jenkins adding the @tmp bit, and is there a way to prevent this behavior?</p>