Added optional file listing, with trailing slashes supported.

Bugfix for failed calls. Now uses _wrapcall for simpler code.