fix manifest generation to exclude directories and urlencode