I asked a similar question last week:
https://groups.google.com/forum/#!topic/webiopi/4ln8Vy5tKgIHas various solutions but you can also place your custom python modules
in /home/pi/myproject/python
Make sure the module ends in .py e.g video_dir.py
and you import it without the py extension
e.g
In script.py call it with
import video_dir
and it should find your module.