api.pl fix file browsing #1

Declare my @files. It was global and accumulated files from all visited dirs.