assignment -02 submission

This is a great assignment. I did not first understand the tasks.txt, but after discussing with you on saturday,
I got it done in less than 1 h.  In the resolve_uri function, I need to hard code "text/plain", in order to make the test pass. Here is my resole_uri method. 
def resolve_uri(uri):
    relv_uri=uri.lstrip('/')
    base='webroot'
    path = os.path.join(base,relv_uri)

    if os.path.exists(path):
        if os.path.isdir(path):
            contents=os.listdir(path)
            body="/n".join(contents)
        elif os.path.isfile(path):
            try:
                body=open(path,'rb').read()
            except :
                raise IOError
    else:
        raise ValueError
 
    mimetype=mimetypes.guess_type(path)[0]
    mimetype="text/plain" if not mimetype else mimetype
    return body,mimetype