commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
This will generate the same output without changing the current directory, and filepath will be relative to the current directory.
Note: it will (still) fail if your iTunes library is in a non-standard location.