Remove HEAD.lock where necessary
Fixes #634
Fix path completion issues in console
Add the following media types to MediaTypeMap
.js and .json

Fixes #637