Try:
#!/bin/bash
PATH=$PATHPATH="$PATH:$(dirname $0)"
ls $PATH
This way you're adding $(dirname $0) to the PATH variable instead of replacing it. Or, if you don't want to edit the environment variable and want to use $(dirname $0) separately, use a different variable name.