Actually, I've been fiddling around with this and I can't seem to get it working.
Update: I've been trying to reproduce this unsuccessfully. Will let you know if it happens again (now I have both files stored on the server, just in case)
Nearly every time. iPad 3, iOS 6.1.3. index.html was local (until I lost it irretrievably), js/waterbug.js was fetched from an SFTP server.
waterbug.js overrides the local console (which is the only weird thing it does)
I also had the WebDAV server running for a bit (which is the only other thing that might access files)
Nope. I never selected it. Actually, I didn't notice this until I typed "open output.html" in a terminal window and it opened Textastic instead of Safari. I don't think I even edited an HTML file in Textastic yet.
And yes, this is in ML. Just reverted back to Safari in the Finder.
Not picky, really. David's suggestion prompted me to try
alias tt='open -a Textastic "$@"'
Which works, although I'm not married to that name :)
Customer support service by UserEcho