Return bool on delete if file is not an array

Now File::delete() returns bool if the path is not an array. Issue #3034.