private function createJavaScriptPaths(array $javascripts)
    {
        $files = array();

        foreach ($javascripts as $file) {
            if (!$this->isExternalJavaScriptFile($file)) {

                if (false !== strpos($file, '?')) {
                    $file = strstr($file, '?', true);
                }

                $file = $this->getBasePath() . $file;
            }

            $files[] = $file;
        }

        return $files;
    }