To ensure relative paths work in a bash script you can set the working directory to the directory the script is in.
To change the directory to the script location can you
cd (change directory) to the value of
cd $(dirname $0)
This means that if the script is called from a different path the relative paths inside the script will still work.