Fixed it so it works (uses basename() now), and added readme instructions

Fixed it so it works (uses basename() now), and added readme instructions