Add support for not default media/skin/js url.

For example, when people change media url to CDN domain for using CDN service, the feature auto-generate the query by using the modification time would broken. It's couse by Mage::getBaseUrl() returns the base url by default.