Fix for ExtractTask does not check output directory (ticket 3852)

[See ticket 3852](https://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/3852-extracttask-does-not-check-output-directory)