use File::Spec->catfile instead of sprintf to form paths

meow