Added basename() to fix path error when using reverse proxy or non-root directory installation

Signed-Off-By: Marcus Ball <marcus@marcusball.me>