Simplify step of building INDEX file.

Fix 'Dir.{base,dir}name'->'File.{base,dir}name'.

More simplify.
Merge pull request #57 from yasuhirokimura/PortsDB_update

Simplify step of building INDEX file.