Added encodeURIComponent() on file and dir url

Urls inside flashvars need to be double escaped.