Fix $dirname

Ubuntu 12.04で、以下のエラーになりました。

```
$ ./install-all-php.sh 
./install-all-php.sh: 62: ./install-all-php.sh: cannot open ./patches/patch-to-php-5.1.6-with-openssl-1.0.0.txt: No such file
./install-all-php.sh: 118: ./install-all-php.sh: cannot open ./patches/patch-to-php-5.1.6-with-libxml2-2.9.txt: No such file
./install-all-php.sh: 144: ./install-all-php.sh: cannot open ./patches/patch-to-php-5.4.6-with-libxml2-2.9.txt: No such file
```