I think I know what the problem is.
I've used the following debug code (added in gamejs.ready in the main.js file in the tmxmap example):
var url = gamejs.utils.uri.resolve(document.location.href, './data/example.tmx');
var url2 = gamejs.utils.uri.resolve(url, 'tilesheet.png');
var imageUrl = gamejs.utils.uri.makeRelative(url2);
console.log(document.location.href);
console.log("indexOf: " + url2.indexOf(document.location.href));
console.log("url: " + url);
console.log("url2: " + url2);
console.log("imageUrl: " + imageUrl);