Cook 1740

Re-forked and fixed issues. Submitting fix provided to ticket.

https://github.com/opscode-cookbooks/postgresql/pull/13

https://tickets.opscode.com/browse/COOK-1740