Fix duplicated primary key index.

Fix duplicate primary key index issues by ignoring the duplicate. Add
a test using a fixture baked in 2.x to keep the task working in the
future.

Refs #44
Reformat difficult to read code.
Fix failing tests.

Make directories if they don't exist.
Merge pull request #46 from cakephp/issue-44

Fix fixture task duplicating primary key index