(TWILL-62) Enhance Location API to add support for listing directory content and also check if a location is directory.

Signed-off-by: Terence Yim <terence@continuuity.com>