redefine the id pattern

now, use whole path under base as 'id' only for 'define' function, and
support relative and whole path for 'require' function