scripts: get_source_date_epoch.sh: fix mercurial support, add mtime fallback