These chunks are too long.  Please stick to 80-character lines.

```
if (!chdir($starttcwd)) {
    $self->error(...);
    return 1;
}
```
is nicer. ;)