added encodeURIComponent() on the file path url

base64_encode() produces "+" that php will treat as whitespace when decoded into $_GET, then base64_decode() fails. i encounterd this when file names contains multibyte characters.