Fixed issue #147 and issue #148. Also added a static variable containing default ports if none is provided. Best practice is still to pass along a port, since a wrong one will cause in a fatal error in the PDO construction of Doctrine, which currently cannot caught.