I think this will need to be `$( cd $(dirname $0) ; pwd -P )` to ensure that the script works from arbitrary working directories