Fixed the -p argument to accept relative and absolute paths.