fix: chomp last newline chars when get port number from system call

This fix for preventing errors below;
```
[Mon Aug 11 07:08:18 2014] [error] [client 192.168.20.1] proxy: DNS lookup failure for: localhost:49153\n returned by /
```
Actually, the system call returns value include "\n" at last chars. it must be removed.