fix copying contents in /usr/local/lib and cleanup

I realized that with `$(dirname $0)` the `cp` command copies the entire content of the `dots` folder rather than the `dots` folder itself, messing up `/usr/local/lib`.