Use BASH_SOURCE[0] for Bash 4; fix typo in unset

These two tweaks make this work properly on my machine.