ls() globbing does not behave like the shell. For instance, this doesn't work:
/opt/stagecoach/apps/*/current/public
The * does not match path components in the middle of a path.
The same thing works, however, if I use the glob module's "glob.sync" method instead.
I suggest using glob.sync rather than a homegrown implementation of ls.
This would impact the options currently supported by ls however.