fewer statements, single os.chdir and .append

Signed-off-by: Alexander Ginzburg <alex@eightbits.com>