fix file resolution of classpath items and add better directory listing