move dirname $0 to first thing