accomadate double digit indices
cd . if dir is empty
accomadate change in makeTable.write()