Improve self-finding in dirt.sh