Please be sure to be using the last version of metasploit, and use normalize_uri to build the url's. Feel free to check other modules for usage of the normalize_uri api:

```
	#
	# Returns a modified version of the URI that:
	# 1. Always has a starting slash
	# 2. Removes all the double slashes
	#
	def normalize_uri(*strs)
```

For example 

```ruby
normalize_uri(target_uri.path.to_s, "images", "stories", "#{@script_name}.php")
```