BUG: Fix path discovery in setup when using pip

The command `pip install` failed because dir_name was set to '', causing
os.chdir to raise an error (at least this is the case inside virtual
environments).  Using os.path.abspath, dir_name will return a valid path that
can be passed to os.chdir.