How to run python macros in LibreOffice?
Try to manually make a subdirectory python
(all lowercase) inside /home/martin/.config/libreoffice/4/user/Scripts
and put your script there.
This is based on this wiki.openoffice.org documentations.
I also struggled to get a clear start, so I documented my setup and the things I learned here. If you work through that, you will see that you can place your python script in any folder as long as you link to it correctly.
EDIT: The old URL-only answer now points to a dead link. That page can still be found on the Internet Archive Wayback Machine or this GitHub Gist.
Python scripts are located on /usr/lib/libreoffice/share/scripts/python
Maybe this tutorial will help, as it did for me.