Fix javascript request path when working with local files