Remove '.js' extension from path name