Converting PDO results into objects

The package was not working when the database.php config file had 'fetch' assigned as "PDO::FETCH_ASSOC" because the package was assuming that PDO is returning an object.

This pull request fixes the bug by typecasting PDO results in to an object for further use.