Fix autolog directory traversing bug