Correctly handle JS file paths in HTML in subdirectories.