Bugfix: delete attached files

I'm not sure what the first case ("\File::delete...") is for ($dir shouldn't be always a directory?), so I wasn't able to test it.
Merge pull request #8 from jay3/patch-3

Bugfix: delete attached files