Fix listImpl

Looks like this is the expected behavior (a MIDlet I'm testing is using the list() result as a filter for another list() call, so the result of the first call can't contain any invalid character, in this case "/").
Nit: since you no longer append the values to curPath, there's no point in initializing it; better to simply declare it and then initialize it in the conditional blocks:

```
var curPath;
if (path == "/") {
  curPath = files[i];
} else {
  curPath = path.substring(1) + "/" + files[i];
}
```