Get the right current path

**test.sh**
```
#!/bin/bash

DIR="$(cd `dirname $0`; pwd)"
echo "DIR=$DIR"
```

**output**
```
t4n017@xxx:~/android/AOSPA$ . test.sh 
DIR=/bin
```