allow apm to work even when runs inside a sub-folder.