Added PHPUnit support

Also made PDO use prepared statements