Fix bug #24 introduced in e7ea26c (Support remote work dir)