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.