Bug 61059 - fix javascript strict warnings in directory.js. r=Neil