use abspath constant, add if empty

Using abspath instead of just placing the file in the parent directory, which varies by install.

Added an if statement that won't run the code if no urls are submitted to be added.